package test;
//二进制1的个数
import java.util.Scanner;
public class topic11{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        while(n > 0){
            if(n%2==1){
                count++;
            }
            n=n/2;
        }
        System.out.println(count);
    }
}
